package Server.ExtComponents.utilsKit;

import org.apache.commons.lang.time.DateFormatUtils;

import java.sql.Timestamp;


public class DateFormatUtil {


    /**
     * formate time yyyy-MM-dd HH:mm:ss
     * @return
     */
    public static String getDateFormatA(){
        long nowTime = System.currentTimeMillis();
        Timestamp timestamp = new Timestamp(nowTime);
        return DateFormatUtils.format(timestamp, "yyyy-MM-dd HH:mm:ss");
    }

    /**
     * formate time HH:mm:ss
     * @return
     */
    public static String getDateFormatB(){
        long nowTime = System.currentTimeMillis();
        Timestamp timestamp = new Timestamp(nowTime);
        return DateFormatUtils.format(timestamp, "HH:mm:ss");
    }

}
